<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>公示信息-西藏投资项目在线审批监管平台</title>

    <#include 'common/common_css.ftl'>
</head>
<body>
<#include 'common/header.ftl'>


<style>
    table {
        table-layout: fixed;
        width: 120px;
    }

    .nav_box nav ul li:nth-child(4) a {
        width: 120px;
        height: 30px;
        line-height: 30px;
        border-radius: 15px;
        background-color: #86cfff91;
        color: #fff;
    }
</style>
<!-- 正文 -->
<div class="content clear">
    <ul class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li><a href="#">公示信息</a></li>
        <li class="active"><a href="javascript:void(0)">办理结果公示</a></li>
    </ul>
    <div class="fix">
        <div class="flleft">
            <dl class="col_links">
                <dt>
                    公示信息
                </dt>
                <dd>
                    <a href="javascript:void(0)" class="active_dd d1" onclick="publicationResults()">办理结果公示</a>
                </dd>
                <dd>
                    <a href="javascript:void(0)" onclick="abnormal()">异常名录</a>
                </dd>
                <dd>
                    <a href="javascript:void(0)" onclick="black()">黑名单</a>
                </dd>
                <dd>
                    <a href="javascript:void(0)" class="d4" onclick="promotion()">推介项目</a>
                </dd>
                <!--<dd>
                <a href="javascript:void(0)">已完成推介项目</a>
            </dd>
            <dd>
                <a href="javascript:void(0)">PPP项目信息</a>
            </dd>-->
            </dl>
        </div>
        <div class="newsContent">
            <div class="flright">
                <div class="header-warp">
                    <div class="title-inner">办理结果公示</div>
                    <div class="search_header">
                        <input type="text" placeholder="项目名称/项目代码" name="" id="keyword" value="">
                        <button class="query_btn" onclick="query()">
                            查询
                        </button>
                    </div>
                </div>



                <div style="position: relative;">
                    <table class="table-bordered table" width="100%" cellpadding="0" id="selectTable"><tbody><tr class="tab"><th>项目代码/项目名称</th><th>审批事项</th><th class="width-100">审批部门</th><th class="width-82">部门区划</th><th class="width-82">审批结果</th><th class="width-100">批复文号</th><th class="time-width">审批时间</th></tr><tr><td>昌都市察雅县物流配送中心项目<br>2209-540325-21-01-445355</td><td>政府出资的投资项目审批可行性研究报告</td><td>察雅县发改委</td><td>察雅县</td><td>批复</td><td>藏发改20220916</td><td>2022/09/16</td></tr><tr><td>昌都市察雅县物流配送中心项目<br>2209-540325-21-01-445355</td><td>政府出资的投资项目审批初步设计及投资概算</td><td>察雅县发改委</td><td>察雅县</td><td>批复</td><td>藏发改20220916</td><td>2022/09/16</td></tr><tr><td>昌都市察雅县质检所<br>2209-540325-17-01-716070</td><td>政府出资的投资项目审批可行性研究报告</td><td>察雅县发改委</td><td>察雅县</td><td>批复</td><td>藏发改20220916</td><td>2022/09/16</td></tr><tr><td>昌都市察雅县质检所<br>2209-540325-17-01-716070</td><td>政府出资的投资项目审批初步设计及投资概算</td><td>察雅县发改委</td><td>察雅县</td><td>批复</td><td>藏发改20220916</td><td>2022/09/16</td></tr><tr><td>国电投昌都八宿邦达镇牧光互补20MW（配储能）保供光伏发电项目<br>2209-540300-04-03-378673</td><td>企业投资项目备案</td><td>昌都市发改委</td><td></td><td>批复</td><td>藏发改20220916藏发改能源(2022)365号</td><td>2022/09/09</td></tr><tr><td>三峡昌都八宿益庆乡10兆瓦牧光互补（配储能）复合型保供光伏发电项目<br>2209-540300-04-03-149823</td><td>企业投资项目备案</td><td>昌都市发改委</td><td></td><td>批复</td><td>藏发改20220916藏发改能源（2022）365号</td><td>2022/09/09</td></tr><tr><td>	浪卡子县牧区动物防疫专用设施建设项目<br>2208-540531-20-01-784847</td><td>实施方案</td><td>浪卡子县发改委</td><td>浪卡子县</td><td>批复</td><td>藏发改20220811</td><td>2022/08/10</td></tr><tr><td>	浪卡子县牧区动物防疫专用设施建设项目<br>2208-540531-20-01-784847</td><td>政府出资的投资项目审批可行性研究报告</td><td>浪卡子县发改委</td><td>浪卡子县</td><td>已退件</td><td></td><td>2022/08/10</td></tr><tr><td>	浪卡子县牧区动物防疫专用设施建设项目<br>2208-540531-20-01-784847</td><td>政府出资的投资项目审批初步设计及投资概算</td><td>浪卡子县发改委</td><td>浪卡子县</td><td>已退件</td><td></td><td>2022/08/10</td></tr><tr><td>	浪卡子县牧区动物防疫专用设施建设项目<br>2208-540531-20-01-784847</td><td>项目建议书</td><td>浪卡子县发改委</td><td>浪卡子县</td><td>已退件</td><td></td><td>2022/08/10</td></tr></tbody></table>
                    <div class="pages" style="left: 42%;">
                        <ul class="pagination" style="text-align: center; display: block;" id="public"><li class="disabled"><span style="">首页</span></li><li class="disabled"><span style="">上一页</span></li><li class="active"><a href="javascript:void(0)" style="">1</a></li><li><a href="javascript:void(0)" style="">2</a></li><li><a href="javascript:void(0)" style="">3</a></li><li><a href="javascript:void(0)" style="">4</a></li><li><a href="javascript:void(0)" style="">5</a></li><li><a href="javascript:void(0)" style="">下一页</a></li><li><a href="javascript:void(0)" style="">尾页</a></li><li><span class="undefined" style="">共5670页</span></li><li><span class="undefined" style="">共56692条记录</span></li></ul>
                        <ul class="pagination" style="text-align: center; display: none;" id="abnormal"></ul>
                        <ul class="pagination" style="text-align: center; display: none;" id="black"></ul>
                        <ul class="pagination" style="text-align: center; display: none;" id="promotion"></ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>


<footer>
    <div class="footer" style="position: static;">
        <p>中央平台友情链接 | 地方平台友情链接</p>
        <p>联系我们: 180-8990-5913、 187-8719-7335  ICP备案：藏ICP备09000529号-7</p>
        <p>网站主办单位：西藏自治区发展和改革委员会 技术支持单位：西藏自治区经济信息中心</p>
    </div>
</footer>



<script>

    $(document).ready(function () {
        $('.col_links dd a').on('click', function () {
            $('.col_links dd a').removeClass("active_dd")
            $(this).addClass("active_dd")
        });

        if (window.location.href.includes("form")) {
            promotion();
            $('.col_links dd a.d1').removeClass("active_dd")
            $('.col_links dd a.d4').addClass("active_dd")
        } else {
            publicationResults(1, 10);
        }
        // $.each(xmsx, function (index, item) {
        //     $("#xmsxSel").append(  //此处向select中循环绑定数据
        //         "<option value=" + item.codeValue + ">" + item.codeName + "</option>");
        // });
        // var search = $('#keyword').val();
        // $.ajax({
        //     type: "GET",
        //     async: false,
        //     url: gatewayUrl + "/report/publicInfo/promotion",
        //     data: {
        //         pages: 1,
        //         rows: 300,
        //         search: search,
        //     },
        //     success: function (res) {
        //         console.log(res)
        //     },
        // });

        // footer页脚位置的设置
        controllFooter();
    });

    function controllFooter() {
        if ($(window).height() < $(document).height()) {
            $(".footer").css('position', 'static');
        } else {
            $(".footer").css({ 'position': 'fixed', 'bottom': '0px' });
        }
    }

    // 时间格式化
    function formatter(time) {
        return time.split(" ")[0].replace(/-/g, "/");
    }

    // 异常情形 - 具体违法行为
    let ycqx = getDictionary("ILLEGAL_TYPE");

    // 异常名录
    function abnormal(pages = 1, rows = 10) {
        $(".pagination").hide();
        $("#abnormal").show();
        $(".title-inner").html("异常名录");
        $(".breadcrumb .active a").html("异常名录")
        $("#keyword").attr("placeholder", "项目（法人）单位")
        var search = $('#keyword').val();
        var html = "<tr class='tab'><th>项目（法人）单位</th><th>具体违反行为</th></tr>";
        $.ajax({
            type: "GET",
            async: false,
            url: gatewayUrl + "/report/publicInfo/abnormal",
            data: {
                pages: pages,
                rows: rows,
                search: search,
            },
            success: function (res) {
                if (res.code === 200) {
                    var result = res.data.data;
                    console.log(result)
                    if (result != null) {
                        for (var i = 0; i < result.length; i++) {
                            for (var j = 0; j < ycqx.length; j++) {
                                if (result[i].illegalType == ycqx[j].codeValue) {
                                    html += "<tr><td>" + result[i].projectDept + "</td><td>" + ycqx[j].codeName + "</td></tr>";
                                }
                            }
                        }
                    }
                    $("#selectTable").html(html);
                    if ($("#abnormal li").length) {
                    } else {
                        $("#abnormal").Paging({
                            currentPage: 1,
                            isFirst: true,   //首页按钮是否显示
                            isPre: true,     //下一页按钮是否显示
                            showRecordNum: 10, // 一页列表数量
                            totalNum: res.data.total,   // 总列表数量
                            showNum: function (data1, data2) {
                                abnormal(data1, data2)
                            }
                        });
                    }
                } else {
                    alert(res.message);
                    return [];
                }
            },
        });
        controllFooter();
    }

    // 黑名单
    function black(pages, rows) {
        $(".pagination").hide();
        $("#black").show();
        $(".title-inner").html("黑名单");
        $(".breadcrumb .active a").html("黑名单")
        $("#keyword").attr("placeholder", "项目（法人）单位")
        var search = $('#keyword').val();
        var html = "<tr class='tab'><th>项目（法人）单位</th><th>原因</th></tr>";

        $.ajax({
            type: "GET",
            async: false,
            url: gatewayUrl + "/report/publicInfo/black",
            data: {
                pages: pages,
                rows: rows,
                search: search,
            },
            success: function (res) {
                var result = res.data.data;
                if (res.code === 200) {
                    if (result != null) {
                        $.each(res.data.data, function (index, item) {
                            html += "<tr><td>" + item.projectDept + "</td><td>" + item.illegalType + "</td></tr>";
                        });
                    }
                    $("#selectTable").html(html);
                }
                if ($("#black li").length) {
                } else {
                    $("#black").Paging({
                        currentPage: 1,
                        isFirst: true,   //首页按钮是否显示
                        isPre: true,     //下一页按钮是否显示
                        showRecordNum: 10, // 一页列表数量
                        totalNum: res.data.total,   // 总列表数量
                        showNum: function (data1, data2) {
                            black(data1, data2)
                        }
                    });
                }
            },
        });
        controllFooter();
    }

    // 办理结果公示 BLJG
    let bljg = getDictionary("BLJG");

    function publicationResults(pages, rows) {
        $(".pagination").hide();
        $("#public").show();
        $(".title-inner").html("办理结果公示")
        $(".breadcrumb .active a").html("办理结果公示")
        $("#keyword").attr("placeholder", "项目名称/项目代码")
        var search = $('#keyword').val();
        var html = "<tr class='tab'><th>项目代码/项目名称</th><th>审批事项</th><th class='width-100'>审批部门</th><th class='width-82'>部门区划</th><th class='width-82'>审批结果</th><th class='width-100'>批复文号</th><th class='time-width'>审批时间</th></tr>";
        $.ajax({
            type: "GET",
            async: false,
            url: gatewayUrl + "/report/publicInfo/publicationResults",
            data: {
                pages: pages,
                rows: rows,
                search: search,
            },
            success: function (res) {
                if (res.code === 200) {
                    var result = res.data.data;
                    console.log(result)
                    if (result != null) {
                        for (var i = 0; i < result.length; i++) {
                            for (var j = 0; j < bljg.length; j++) {
                                if (result[i].obtainresult == bljg[j].codeValue) {
                                    html += "<tr><td>" + result[i].applyProjectName + "<br/>" + result[i].dealCode + "</td><td>" + result[i].itemName + "</td><td>" + result[i].deptName + "</td><td>" + result[i].districtname + "</td><td>" + bljg[j].codeName + "</td><td>" + result[i].approvalNum + "</td><td>" + formatter(result[i].applyTime) + "</td></tr>";
                                }
                            }
                        }
                    }
                    $("#selectTable").html(html);

                    if ($("#public li").length) {

                    } else {
                        $("#public").Paging({
                            currentPage: 1,
                            isFirst: true,   //首页按钮是否显示
                            isPre: true,     //下一页按钮是否显示
                            showRecordNum: 10, // 一页列表数量
                            totalNum: res.data.total,   // 总列表数量
                            showNum: function (data1, data2) {
                                publicationResults(data1, data2);
                            }
                        });
                    }

                } else {
                    alert(res.message);
                    return [];
                }

            },
        });
    }

    // 推介项目
    // 所属行业
    let sshy = getSSHY("SSHY", 1, 99999);

    function getSSHY(coding, pages, rows) {
        // let url='http://localhost:80/api'中介服务事项
        let dicData;
        $.ajax({
            type: "GET",
            async: false,
            url: gatewayUrl + "/report/dictionary/category/info",
            // url: url + "/report/dictionary/category/info",
            data: {
                coding: coding,
                pages: pages,
                rows: rows,
            },
            success: function (res, status) {
                if (res.code === 200) {
                    dicData = res.data.data;
                    console.log(dicData.length, 999)
                } else {
                    alert(res.message);
                    return [];
                }
            },
        });
        return dicData;
    }

    function promotion(pages, rows) {
        $(".pagination").hide();
        $("#promotion").show();
        $(".title-inner").html("推介项目")
        $(".breadcrumb .active a").html("推介项目")
        $("#keyword").attr("placeholder", "项目名称/项目代码")
        var search = $('#keyword').val();
        var html = "<tr class='tab'><th class='id-width'>序号</th><th class='time-width'>推介时间</th><th>项目名称/项目代码</th><th class='width-90'>所属行业</th><th>建设地点</th><th>主要建设内容及规模</th><th>总投资(亿元)</th><th class='width-90'>项目进展</th></tr>";
        $.ajax({
            type: "GET",
            async: false,
            url: gatewayUrl + "/report/publicInfo/promotion",
            data: {
                pages: pages,
                rows: rows,
                search: search,
            },
            success: function (res) {
                if (res.code == 200) {
                    console.log('wokule');
                    var result = res.data.data;
                    if (result != null) {
                        for (var i = 0; i < result.length; i++) {
                            var tmp_index = i + 1;
                            if (result[i].theIndustry == "") {
                                // <button type='button' class='btn btn-primary' onclick='getPromotionDetail(\"" + result[i].projectUuid + "\")'>详情</button>
                                html += "<tr><td>" + tmp_index + "</td><td>" + result[i].promotionTime + "</td><td>" + result[i].applyProjectName + "<br/>" + result[i].dealCode + "</td ><td>" + "" + "</td><td>" + result[i].areaDetial + "</td><td title=\'' + result[i].scaleContent + '\'>" + result[i].scaleContentOmit + "</td><td>" + result[i].totalMoney + "</td><td><span class='click-style' onclick='getPromotionDetail(\"" + result[i].projectUuid + "\")'>详情</span></td></tr> ";
                            } else {
                                for (var j = 0; j < sshy.length; j++) {
                                    console.log(result[i].theIndustry, 111)
                                    if (result[i].theIndustry == sshy[j].codeValue) {
                                        // <button type='button' class='btn btn-primary' onclick='getPromotionDetail(\"" + result[i].projectUuid + "\")'>详情</button>
                                        html += "<tr><td>" + tmp_index + "</td><td>" + result[i].promotionTime + "</td><td>" + result[i].applyProjectName + "<br/>" + result[i].dealCode + "</td ><td>" + sshy[j].codeName + "</td><td>" + result[i].areaDetial + "</td><td title=\'' + result[i].scaleContent + '\'>" + result[i].scaleContentOmit + "</td><td>" + result[i].totalMoney + "</td><td><span class='click-style' onclick='getPromotionDetail(\"" + result[i].projectUuid + "\")'>详情</span></td></tr> ";
                                    }
                                }
                            }
                        }
                    }
                    $("#selectTable").html(html);

                    if ($("#promotion li").length) {
                    } else {
                        $("#promotion").Paging({
                            currentPage: 1,
                            isFirst: true,   //首页按钮是否显示
                            isPre: true,     //下一页按钮是否显示
                            showRecordNum: 10, // 一页列表数量
                            totalNum: res.data.total,   // 总列表数量
                            showNum: function (data1, data2) {
                                promotion(data1, data2)
                            }
                        });
                    }
                } else {
                    alert(res.message);
                    return [];
                }
            },
        });
        controllFooter();
    }

    // 推介项目-查看项目进展详情
    function getPromotionDetail(projectUuid) {
        if (inThymeleaf()) {
            $(window).attr('location', "/report/publicInfo/gsxx/tjxmDetails?tjxmProjectUuid=" + projectUuid);
        } else {
            $(window).attr('location', "/templates/gsxx/tjxmDetails.html?tjxmProjectUuid=" + projectUuid);
        }
    }

    // 查询
    function query() {
        var text = $(".col_links").find(".active_dd").text();
        if (text == "办理结果公示") {
            $("#public").html("")
            publicationResults(1, 10)
        } else if (text == "异常名录") {
            $("#abnormal").html("")
            abnormal(1, 10)
        } else if (text == "黑名单") {
            $("#black").html("")
            black(1, 10)
        } else if (text == "推介项目") {
            $("#promotion").html("")
            promotion(1, 10)
        } else if (text == "已完成推介项目") {

        } else if (text == "PPP项目信息") {

        }
        $('#keyword').val("");
        controllFooter();
    }
</script>


<#include 'common/footer.ftl'>
</body>

<#include 'common/common_js.ftl'>
</html>
